import Vue from 'vue'
import qs from 'qs'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN'
import 'font-awesome/css/font-awesome.css'

import '@/styles/index.scss'

import 'jquery'
import service from './utils/request'
import lodash from 'lodash'

import App from './App'
import router from './router'
import store from './store'
import './filter'

import '@/icons' // icon
import '@/permission'

Vue.prototype.$http = service
Vue.prototype.$lodash = lodash

if (sessionStorage.getItem('token')) {
  Vue.prototype.$headers = { token: sessionStorage.getItem('token') }
}

Vue.use(ElementUI, {
  locale
})

Vue.config.productionTip = false
Vue.prototype.$qs = qs

new Vue({
  router,
  store,
  // template: '<App/>',
  render: h => h(App)
}).$mount('#app')
